<template>
	<view class="container">
		<view class="status_bar">
			<view style="margin-left: 4%;" @tap="goBack()"><u-icon name="arrow-leftward" size='24' /></view>
			<view style="margin-left: -50upx; font-weight: bold;">公告列表</view>
			<view></view>
		</view>
		<view class="shop-box" v-for="(item, index) in dataList" :key="index">
			<!-- <view @tap="toPage('/pages/mine/vipOpen/announcementDetail')"> -->
			<view @tap="toPage(`/pages/mine/vipOpen/announcementDetail?id=${item.id}`)">
				<view class="list-title">
					<image src="../../../static/image/user/icon20@3x.png" mode=""></image>
					<view>{{item.title}}</view>
				</view>
				<view class="list-time" style="margin-top: 24upx;">{{item.update_time}}</view>
				<view  class="list-time">{{item.content}}</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				userId: uni.getStorageSync('userId') || '',
				dataList: [{
						title: "平台进化治理公告（第六期）",
						time: "09月24日至11月16日",
						con: "平台共受理3190条举报，当你精神焕发交话费黄金豆腐"
					},
					{
						title: "平台进化治理公告（第六期）",
						time: "09月24日至11月16日",
						con: "平台共受理3190条举报，当你精神焕发交话费对方的负担"
					},
					{
						title: "平台进化治理公告（第六期）",
						time: "09月24日至11月16日",
						con: "平台共受理3190条举报，当你精神焕发交话费"
					},
				]
			}
		},
		onShow() {
			this.getBoardList()
		},
		methods: {
			goBack() {
				uni.navigateBack({
					delta: 1
				});
			},
			getBoardList() {
				uni.request({
					url: this.$api.baseUrl + '/api/common/notice/fetch',
					header: {
						'content-type': 'application/json'
					},
					data: {
						//user_uid: uni.getStorageSync('user_uid'),
						page: 1,
						page_size: 20
					},
					method: 'POST',
					success: res => {
						console.log(res, 'res');
						// uni.hideLoading()
						if (res.data.code == 0) {
							this.dataList = res.data.data
			
						}
						console.log(this.list);
						// this.list = res.data;
					},
					fail: res => {
						console.log(res);
					}
			
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	// page {
	// 	background-color: #999;
	// }
	.status_bar {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 50upx;
	}

	.status_bar,
	.head {
		background-color: #fff;
		height: 160upx;

		.face {
			width: 160upx;
			height: 160upx;
			border-radius: 10upx;
		}

		.info-name {
			font-size: 40upx;
			font-weight: bold;
		}

		.info-num {
			// width: 56upx;
			padding: 2upx 30upx;
			background: #f0f4f7;
			border-radius: 30upx;
			margin-top: 21upx;
		}

		.copybtns {
			color: #4457a4;
			margin-top: 21upx;
		}
	}

	.shop-box {
		width: 92%;
		margin-left: 4%;
		background-color: #fff;
		margin-top: 20upx;
		border-radius: 20upx;
		padding: 10upx 30upx;
		box-shadow: 0 0 40upx #d6e7f1; // 左
		box-shadow: 0 0 40upx #d6e7f1; // 右
		color: #2e2e2e;
		// font-weight: 300;

		image {
			width: 40upx;
			height: 40upx;
			padding: 10upx 28upx 0upx 10upx;

		}

		.list-title {
			display: flex;
			align-items: center;
			border-bottom: solid 1px #d6e7f1;
			padding: 20upx 0;
		}
		.list-time{
			font-size: 30upx;
			color: #5e5e5e;
			padding: 12upx;
			font-weight: 300;
		}

	}
</style>